#pragma once

#include <map>
#include <hash_map>

#include "Renderable.h"

namespace Graphics
{
	class Null{};
	class CompRenderable
	{
	public:
		bool operator()(Renderable* const r1,Renderable* const r2)
		{
			return r1->GetSequence() < r2->GetSequence();
		}
	};

	typedef std::multimap<Renderable*  const,Null,CompRenderable> RenderMap;
	typedef std::pair <Renderable*  const,Null> RenderPair;
	typedef stdext::hash_map<Renderable* const,Null> RenderHash;

	class Graphic
	{
	private:
		 RenderHash m_RenderHash;

	public:
		Graphic(void);
		virtual ~Graphic(void) = 0;

	public:
		// Render every Renderable obj in the RenderHash
		virtual bool RenderAll(void);

		// Add a Renderable ptr to the RenderHash
		virtual void Add(Renderable* const obj);

		// Remove a Renderable ptr from the RenderHash
		virtual void Remove(Renderable* const obj);
	};
}